<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="${ctx}/jslib/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
<title>Insert title here</title>
</head>
<body>
<form id="form">
    	<input type="hidden" name="shortName" value="xxx"> 
    	<input type="hidden" name="sex" value="1"> 
    	<input type="text" name="name"/>
    	<input id="tijiao" type="button" onclick="submitForm()" value="提交" >
</form>
<script type="text/javascript">
function submitForm(){
	var ajaxCallUrl = "${ctx}/oxygen/saveOrUpdate";
	var data = [{"creatDate":1466599266429,"dataSourse":"手机App","id":19422,"personId":"45010300500000002","pulse":82,"spo2":97},{"creatDate":1466599817791,"dataSourse":"手机App","id":19423,"personId":"45010300500000010","pulse":75,"spo2":98},{"creatDate":1466611202093,"dataSourse":"手机App","id":19424,"personId":"45010300500204344","pulse":77,"spo2":98},{"creatDate":1466611329417,"dataSourse":"手机App","id":19425,"personId":"45010300500306185","pulse":77,"spo2":93},{"creatDate":1466614535870,"dataSourse":"手机App","id":19426,"personId":"45010300500000057","pulse":63,"spo2":97},{"creatDate":1466614721916,"dataSourse":"手机App","id":19427,"personId":"45010300500000058","pulse":72,"spo2":97},{"creatDate":1466617190561,"dataSourse":"手机App","id":19430,"personId":"45010300500000055","pulse":84,"spo2":96}];
	 
	 $.ajax({
			url : ajaxCallUrl,
			type : "POST",
			data : JSON.stringify(data), //转JSON字符串
		    dataType: 'json',
		    cache:false,
	        contentType:'application/json;charset=UTF-8', //contentType很重要   
	        Accept: 'application/json',		
	        success : function(result) {
				console.log(result);
			}
	 });
}
</script>
</body>
</html>